<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      width: 200px;
      height: 200px;
      background-color: rgb(51, 89, 196);
      margin: 30px auto;
    }
  </style>
</head>
<body>
  <div id="app">
    <button @click="isShow = !isShow">
      {{ isShow? '隐藏': '显示' }}
    </button>
    <div v-show="isShow" class="box"></div>
  </div>
  <script src="./vue.js"></script>
  <script>
  //  定义一个实例
  const vm = new Vue({
    el: '#app',
    data: {
      isShow: true
    }
  })
  </script>
</body>
</html>